package com.kygeng.springframework.beans.factory.support;

import com.kygeng.springframework.beans.BeansException;
import com.kygeng.springframework.core.io.Resource;
import com.kygeng.springframework.core.io.ResourceLoader;
import org.dom4j.DocumentException;

/**
 * @Title: BeanDefinitionReader
 * @Author: kygeng
 * @Package: com.kygeng.springframework.beans.factory.support
 * @Date: 2024/7/21 20:34
 * @Description: Bean定义读取接口
 */
public interface BeanDefinitionReader {

    //获取Bean的注册信息
    BeanDefinitionRegistry getRegistry();

    //获取资源加载器
    ResourceLoader getResourceLoader();

    //加载bean的定义信息
    void loadBeanDefinitions(Resource resource) throws BeansException, DocumentException;

    //加载bean的定义信息
    void loadBeanDefinitions(Resource... resources) throws BeansException;

    //加载bean的定义信息
    void loadBeanDefinitions(String location) throws BeansException;

    void loadBeanDefinitions(String... locations) throws BeansException;

}
